<?php
/*
 * 音频流过滤job
 */

namespace App\Jobs\Content;

use App\Jobs\Job;
use Carbon\Carbon;

class AudioJob extends Job
{
    protected $data;

    public function __construct($data = [])
    {
        $this->data = [
            'key_id'          => $data['key_id'] ?? 0,
            'app_id'          => env('CONTENT_APP_ID'),
            'user_id'         => $data['user_id'] ?? 0,
            'room_id'         => $data['room_id'] ?? 0,
            'pit_number'      => $data['pit_number'] ?? 0,
            'content_name'    => $data['content_name'] ?? 0,
            'score'           => $data['score'] ?? 0,
            'audio_endtime'   => $data['audio_endtime'] ?? 0,
            'audio_starttime' => $data['audio_starttime'] ?? 0,
            'audio_text'      => $data['audio_text'] ?? '',
            'audio_url'       => $data['audio_url'] ?? '',
            'add_time'        => $data['add_time'] ?? Carbon::now(),
            'risk_type'       => $data['risk_type'] ?? '',
            'machine_result'  => $data['risk_desc'] ?? '',
        ];
    }
}
